//
//  Persion.m
//  OC单例
//
//  Created by clz on 2019/7/21.
//  Copyright © 2019年 clz. All rights reserved.
//

#import "Persion.h"

@implementation Persion

static Persion *_persion;

+(instancetype)allocWithZone:(struct _NSZone *)zone{
    
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        if (_persion == nil) {
            _persion = [super allocWithZone:zone];
        }
    });
    
    return _persion;
}

+ (Persion *)shareInstance{
    return [[self alloc]init];
}

- (id)copyWithZone:(NSZone *)zone{
    return _persion;
}

- (id)mutableCopyWithZone:(NSZone*)zone{
    return _persion;
}

@end
